<html>
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=
    , initial-scale=1.0">
    <title>取值与赋值</title>
</head>
<body>
    <div>
        <ul>
            <li class="item">
                <span>第一项</span>
            </li>
            <li class="item">第二项</li>
            <em>第三项</em>
    </div>
</body>
<script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.6.3.js"></script>
<script>
    console.log( $("li").html())
    $(".item").html("<b>通过jQuery修改li内容</b>")
    console.log( $("#elem").text())
    $("#elem").text("<a>百度</a>")
</script>
</html>